{include file="header"}
<script src="/js/ckeditor/ckeditor.js"></script>
<div class="body">
	<div class="nav">
		<div class="addbtn"></div>
		<a href="/xcxmb/public/admin/frist">首页</a> > <a href="/xcxmb/public/admin/atricle">文章管理</a> > 修改
	</div>
		<form class="checkform" action="update" method="post" enctype="multipart/form-data">
		<input type="hidden" name="id" id="id" value="{$info.id}" />
		<br>
		<table class="tap" width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="160" class="gra" align="center" height="50">标题</td>
				<td><input title="" type="text" name="title" id="title" value="{$info.title}" class="binput coo-need" />
				</td>
			</tr>
			<tr>
				<td width="160" class="gra" align="center" height="50">作者</td>
				<td><input title="" type="text" name="writer" id="writer" value="{$info.writer}" class="binput coo-need" />
				</td>
			</tr>

			<tr>
				<td width="160" class="gra" align="center">封面图片</td>
				<td>
				<table><tr><td height="60">
						<input type="hidden" name="origin_pic" value="{$info.pic}" />
						<input type="text" name="pic" id="pic" value="{$info.pic}" />
						<!--<input type="file" id="" name="pic" value="{$info.pic}" />-->
						<font color="gray"><i>尺寸为640x220像素</i></font>
					</td>
					<td>
					{if $info.pic}<p><img src="{$info.pic}" height="100" /></p>{/if}
					</td>
				</tr></table>
				</td>
			</tr>
			
			<tr>
				<td width="160" class="gra" align="center">内容</td>
				<td>
					<textarea class="ckeditor" name="content" id="content" style="width:80%" rows="20">{$info.content}</textarea>
				</td>
			</tr>	
			<tr>
				<td width="160" class="gra" align="center" height="50">是否显示</td>
				<td>
				<input title="" type="radio" name="status" value="0" {if $info.status==0}checked{/if} />是
				 <input title="" type="radio" name="status" value="1" {if $info.status==1}checked{/if} />否
				</td>
			</tr>			
			<tr>
				<td width="160" class="gra" align="center" height="50">排序</td>
				<td><input title="" type="text" name="sort" id="sort" value="{$info.sort}" class="binput coo-need" />
					<span class="gray">数字越小，排在越前</span>
				</td>
			</tr>
			<tr>
				<td width="160" class="gra" align="center">点击量</td>
				<td><input title="" type="text" name="clicks" id="clicks" value="{$info.clicks}" class="binput" />
				</td>
			</tr>
			<tr class="last">
				<td align="center">&nbsp;</td>
				<td><input type="submit" id="Submit" class="submitbtn" value="提 交" /></td>

			</tr>

		</table>
		</form>
</div>
<script>
    //ajax
    var xhr;
    var now=0;
    function createXMLHttpRequest()
    {
        if(window.ActiveXObject)
        {
            xhr = new ActiveXObject("Microsoft.XMLHTTP");
        }
        else if(window.XMLHttpRequest)
        {
            xhr = new XMLHttpRequest();
        }
    }

    function onDel(id)
    {
        if(confirm("是否删除？")){
            var picdiv = document.getElementById(id);
            picdiv.parentNode.removeChild(picdiv);
            if($('#imgs').children().length<4){
                $('#file').show();//('display','hidden');
            }
        }else
        {
            return false;
        }
    }
</script>
{include file="footer"}